#ifndef _EON_SERVER_H
#define _EON_SERVER_H

#include "Eon.h"

#include <Ecore.h>
#include <Eix.h>

#include <stdio.h>

#define ERR(...) EINA_LOG_DOM_ERR(eon_server_log, __VA_ARGS__)
#define WRN(...) EINA_LOG_DOM_WARN(eon_server_log, __VA_ARGS__)
#define DBG(...) EINA_LOG_DOM_DBG(eon_server_log, __VA_ARGS__)
extern int eon_server_log;

typedef struct _Eon_Server_Server Eon_Server_Server;
typedef struct _Eon_Server_Client Eon_Server_Client;
typedef struct _Eon_Server_Window Eon_Server_Window;

Eon_Server_Server * eon_server_server_new(Eon_Backend *backend);
Ender_Element * eon_server_server_root_get(Eon_Server_Server *s);
void eon_server_server_delete(Eon_Server_Server *thiz);

Eon_Server_Client * eon_server_client_new(Eon_Server_Server *s, Eix_Client *c);
void eon_server_client_delete(Eon_Server_Client *thiz);
Eina_Bool eon_server_client_window_add(Eon_Server_Client *thiz, unsigned int id, unsigned int width, unsigned int height);
void eon_server_client_element_new(Eon_Server_Client *thiz, unsigned int id, const char *name);
Eina_Bool eon_server_client_element_set(Eon_Server_Client *thiz, unsigned int id, const char *name, Eon_Ecore_Remote_Data *data);
Eina_Bool eon_server_client_element_add(Eon_Server_Client *thiz, unsigned int id, const char *name, Eon_Ecore_Remote_Data *data);

Eon_Server_Window * eon_server_window_new(Eon_Server_Client *client, Ender_Element *root, unsigned int width, unsigned int height);
void eon_server_window_size_set(Eon_Server_Window *thiz, unsigned int width, unsigned int height);
Ender_Element * eon_server_window_root_get(Eon_Server_Window *thiz);

#endif /*_EON_SERVER_H*/
